﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using ConfApp.Models;

namespace ConfApp.Services.Mock
{
    public class TwitterStoreMock : ITwitterStore
    {
        private readonly List<Twitt> _twitts;
        
        public TwitterStoreMock()
        {
            _twitts = new List<Twitt>();
            //_twitts.Add(new Twitt
            //{
            //    User = "Srki",
            //    Text = "Hello Zoki",
            //    Date = new DateTime(2011, 5, 25, 23, 45, 0)
            //});
            //_twitts.Add(new Twitt
            //{
            //    User = "Zoki",
            //    Text = "Hello Srki",
            //    Date = new DateTime(2011, 4, 25, 12, 50, 0)
            //});
        }

        public string SinceId { get; set; }

        public IEnumerable<Twitt> GetTwitts()
        {
            return _twitts.OrderByDescending(t => t.Date);
        }

        public int SaveTwitts(IEnumerable<Twitt> twitts)
        {
            _twitts.AddRange(twitts);
            return 1;
        }

        public void SaveStore()
        {
            
        }
    }
}
